<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ImageComponent
 *
 * @author Jhonny
 */
class ImageComponent {
    private $source;
    private $alt;

    public function __construct() {
    }

    public function getSource() {
        return $this->source;
    }

    public function setSource($source) {
        $this->source = $source;
    }

    public function getAlt() {
        return $this->alt;
    }

    public function setAlt($alt) {
        $this->alt = $alt;
    }

    public function toString() {
        $value ='    ';
        if($this->getSource()!=null){
            $value .= '<IMG src="'.$this->getSource().'"';
            if($this->getAlt()!=null){
                $value .= ' alt="'.$this->getAlt().'" ';
            }
            $value .= '/>
                ';
        }
        return $value;
    }

}
?>
